﻿using System;

namespace SampleShop
{
    class Program
    {
        static void Main(string[] args)
        {
            //1.创建商户A / B
            AbstractMerchant merchantA = new MerchantUser() { UserId = 1, UserName = "商户A" };
            AbstractMerchant merchantB = new MerchantUser() { UserId = 2, UserName = "商户B" };
            //2.创建商品 A/B
            IProduct productA = new Product() { Id = 1, Name = "尿不湿A", Price = 12.8m };
            IProduct productB = new Product() { Id = 1, Name = "尿不湿B", Price = 15.5m };
            //3.商家添加商品
            merchantA.AddProduct(productA);
            merchantB.AddProduct(productB);
            //4.创建普通用户
            AbstractUser consummerA = new ConsummerUser { UserId = 1, UserName = "用户A" };
            AbstractUser consummerB = new ConsummerUser { UserId = 2, UserName = "用户B" };
            //5.用户收藏商品
            consummerA.FocusProduct(productA);
            consummerB.FocusProduct(productB);
            //6.设置开启降价通知
            consummerA.IsNotify(true);
            consummerB.IsNotify(true);
            //7.商户A给商品A降价
            merchantA.EditProduct(productA, 11);
            //8.商户B给商品B降价
            merchantB.EditProduct(productB, 14.7m);
            
            Console.ReadKey();
        }
    }
}
